<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<IEnumerable<DesigningViews.Models.Product>>" %>
<%@ Import Namespace="DesigningViews.Controllers"%>
<%@ Import Namespace="DesigningViews.Helpers"%>
<%@ Import Namespace="MvcContrib.FluentHtml"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	View Products
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>View Products</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Name
            </th>
            <th>
                Price
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
				<a href="<%= Url.Action<ProductAfterController>(c => c.Edit(0), new { id = "5" }) %>">Edit</a>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.Price)) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

